const express = require("express");
const router = express.Router();
// 检验器
const { getNewsList_validation, getNewsDetail_validation, editNews_validation } = require("../validators/news");
// 控制器
const { getNewsList, getNewsDetail, editNews, deleteNews } = require("../controllers/news");

router.get("/getNewsList", getNewsList_validation, getNewsList); // 新闻资讯列表
router.get("/getNewsDetail", getNewsDetail_validation, getNewsDetail); // 新闻资讯详情
router.post("/editNews", editNews_validation, editNews); // 添加新闻资讯
router.delete("/deleteNews", getNewsDetail_validation, deleteNews); // 删除新闻资讯

module.exports = router;
